package com.darren.archive.controller;

import com.darren.framework.bean.ResponseBean;
import com.darren.framework.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@Api(value = "应用程序",tags = "部分系统接口",description = "部分系统接口")
@Controller
public class ApplicationController extends BaseController {


    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "姓名",required = true,paramType = "path",dataType = "String")
    })
    @ApiOperation(value = "欢迎接口",notes = "测试接口")
    @GetMapping("/application/welcome/{name}")
    @ResponseBody
    public ResponseBean getProjectEmployees(@PathVariable(name = "name") String name){
        logger.info("Hello {}, welcome to here.",name);
        return ResponseBean.isOk("Hello "+name+", welcome to here.");
    }

    @RequestMapping("/home")
    public String showSelectProduct(HttpServletRequest request){

        return "/backend/application";
    }



}
